home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / Views / ModalFun-2 / README.Modal < prev   
Encoding:
Text File  |  1994-02-28  |  1.5 KB  |  38 lines  |  [TEXT/R*ch]

  1. ModalDialog    by Maurice Sharp
  2. Copyright © 1993, 1994 by Apple Computer, Inc.  All rights reserved.
  3. For NTK 1.0b4
  4.  
  5. This sample shows how to use the ModalDialog() view message.
  6. ModalDialog behaves like Open. Until the view opened by this message
  7. is closed, most tapping in built in applications will not produce
  8. any effects (in other words, tapping a the Dates button will not
  9. bring  up the datebook, clicking on the file folder in the Notepad
  10. will not bring up the filing dialog). A notable exception is that
  11. you can still write on the notepad.
  12.  
  13. Important Things
  14. ----------------
  15.  
  16. 1. You have to send the ModalDialog message in a deffered action.
  17.  
  18. Take a look at the buttonClickScript of the text button in main.t
  19.  
  20. It calls a function in the man protoApp (myBase) called doModal.
  21. This is a simple function that you can use for your own enjoyment.
  22.  
  23.  
  24. 2. You must take care of your preventing taps to your own application.
  25.  
  26. The modal.t layout has a large clView as a base. This is used to mask
  27. taps from the underlying application. It will size itself to its
  28. parent using full H and V justification (viewJustify slot). This view
  29. is invisible (Fill None) and takes Taps). It prevents taps getting through
  30. to your base application (like the close box or clock of the Modal Fun protoApp)
  31.  
  32. 3. Close the modal view or forever be modal
  33.  
  34. Closing the view that was opened with the ModalDialog message will
  35. exit the modal state (clever huh?). That is why the OK and Cancel
  36. buttons close it. Of course, closing your application would do the
  37. same thing.
  38.